package com.sgd.cli.pattern;

/**
 * <p>Title: 具体命令（相当于遥控器的某个按钮）</p>
 * <p>Description: 它负责将请求传递给接收者（设备）并执行具体的操作</p>
 *
 * @author su.gd
 * @date 2023-11-22
 */
public class TurnoffCommand implements Command {
    private Device device;

    public TurnoffCommand(Device device) {
        this.device = device;
    }

    @Override
    public void execute() {
        device.turnOff();
    }
}
